package com.cyq.day03;

import java.util.Scanner;

public class Practice01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入运送距离(单位km)");
        int basicPrice = 800;
        int distance = sc.nextInt();
        double down = 1;
        if (distance < 0) {
            System.out.println("请输入正确的运送距离");
        } else {
            if (distance >= 3000) {
                down = 0.85;
            } else if (distance >= 2000) {
                down = 0.9;
            } else if (distance >= 1000) {
                down = 0.92;
            } else if (distance >= 500) {
                down = 0.95;
            } else {
                down = 0.98;
            }
        }
        double price = distance * down * basicPrice;
        System.out.println("运送计费为" + price);
    }
}
